/**
 * 计算属性
 */


var app = new Vue({
    el : "#app",
    data : {
        math: 80,
        physics: 70,
        english : 60 
    },
    methods: {
        
    },
    computed:{
        sum: function(){
            return parseFloat(this.math|| 0) 
                + parseFloat(this.physics|| 0)
                + parseFloat(this.english|| 0)
        },
        average: function () {
            return Math.round(this.sum/3)
        }
    }
})